package com.kaibo.redis.queue.message;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

/**
 * @author: kaibo
 * @date: 2021/1/9 14:26
 * @GitHub: https://github.com/yuxuelian
 * @qq: 568966289
 * @description:
 */


@Component
public class MessageProduct {

    @Autowired
    StringRedisTemplate stringRedisTemplate;

    public void sendMessage(String message) {
        stringRedisTemplate.opsForList().leftPush(MessageConsumer.MESSAGE_TEST, message);
    }

}
